<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery.min.js"></script>
    <script>
        $(function() {
            var arr = ['pig', 'dog', 'friend', '隔壁老王', '特朗普', 'money'];
            $(".box").on('mouseenter', function() {
                // var random = Math.random() * 10;
                var index = Math.floor(Math.random() * arr.length);
                $(".bottom").text(arr[index]);
            });
        })
    </script>
    <style>
        body {
            perspective: 500px;
        }
        
        .box {
            position: relative;
            width: 200px;
            height: 200px;
            margin: 100px auto;
            /* background-color: #f00; */
            transform-style: preserve-3d;
            transition: all 1s;
        }
        
        .box:hover {
            transform: rotateY(-180deg);
        }
        
        .front,
        .bottom {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            text-align: center;
            line-height: 200px;
            color: white;
            font-size: 30px;
        }
        
        .front {
            background-color: yellow;
            z-index: 1;
        }
        
        .bottom {
            background-color: blue;
            transform: rotateY(180deg);
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="front">请猜猜我是谁?</div>
        <div class="bottom">bottom</div>
    </div>
</body>

</html>